Array tags are used with alarms. Rather than using a tag for each alarm trigger, you can create an array tag with a specific number of elements and connect an alarm trigger to each element. This frees up more tags for other uses.
Use bit arrays with bit or LSBit trigger types to trigger alarm messages. By assigning alarm triggers to the elements in a bit array instead of to bit addresses, you leave more tags in the database free for other uses. When an element of an array changes from 0 to 1, it can generate an alarm message if a message has been set up for that bit position. With the Bit trigger type, you can generate simultaneous alarm messages, one for each element. With the LSB trigger type, only the lowest bit position would trigger an alarm.
The number of bits in the array depends on the data type of the tag. Integer data types, for example, return 16 bits per element, while Bit data types return 8 bit per element.
To trigger a digital alarm based on an array of controller bits, you must use a direct reference and the syntax tagname,Larraylength (for example, [PLC5]N7:0,L5.
Tip: |
Do not leave a space between the tag address and the length. For example, the address {[SLC]BlockWrite1, L8} (where BlockWrite is the equivalent of N7:0), will not work. {[SLC]BlockWrite1,L8} will work. |
In the Trigger Value column, enter a number for the element that will trigger the message, and create the message in the Message column. When that element in the array changes value, it will trigger the alarm and display the message.
Bit position |
Trigger Value |
Message |
1 |
1 |
Line 1: Conveyor has stopped |
2 |
2 |
Line 1: Power failure |
3 |
3 |
Line 2: Conveyor has stopped |
4 |
4 |
Line 2: Power failure |
.. |
.. |
.. |
1024 |
1024 |
Line 6: Oven door open |
Bit in the array |
Bit position |
Trigger value |
Message |
00 |
1 |
1 |
Motor has lost power |
01 |
2 |
2 |
Motor has stopped |
02 |
3 |
3 |
Overload switch has lost power |
At run time, if power to the motor is lost, all three bit values will change from 0 to 1, but only the first alarm message will be generated, because bit 00 is the least significant, that is, the lowest, bit. If the operator acknowledges the first alarm and power is not yet restored, the second alarm is generated, and so on.
Set up alarm triggers (Trigger tab)
Keywords: array tag